<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/public/common.jspf" %>
<html>
<head>
    <title>算法列表</title>
</head>
<body>
<div class="col-sm-9">
    <div class="row">
        <div class="col-lg-12">
            <div class="page-header">
                <h1>
                    全部算法
                </h1>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <div class="text-muted bootstrap-admin-box-title">
                        全部算法
                    </div>
                </div>
                <div class="bootstrap-admin-panel-content">

                    <!--search form start-->
                    <div class="row text-center" style="margin-bottom:15px;">
                        <div class="col-xs-12">
                            <s:form cssClass="form-inline" role="form" action="article_list">
                                <div class="form-group">
                                    <label class="sr-only">
                                        记录数
                                    </label>
                                        <%--todo 发布前修改为真实的分页量--%>
                                    <s:select list="#{'每页10条':'10','每页20条':'20','每页30条':'30'}" cssClass="form-control"
                                              name="pageSize" listValue="key" listKey="value">
                                    </s:select>
                                </div>
                                <div class="form-group">
                                    <label class="sr-only">
                                        排序条件
                                    </label>
                                    <s:select cssClass="form-control" list="#{'默认排序':'id','按照发表时间':'time','按下载量排序':'download'}"
                                              name="sortBy" listKey="value" listValue="key">
                                    </s:select>
                                </div>
                                <div class="form-group">
                                    <label class="sr-only">
                                        排序
                                    </label>
                                    <s:select cssClass="form-control" name="asc"
                                              list="#{'升序':'asc','降序':'desc'}" listValue="key" listKey="value">
                                    </s:select>
                                </div>
                                <div class="form-group">
                                    <label class="sr-only">
                                        查询
                                    </label>
                                    <s:textfield name="filterString" placeholder="请输入查询字符串" cssClass="form-control"/>
                                </div>
                                <button type="submit" class="btn btn-default">
                                    查询
                                </button>
                            </s:form>
                        </div>
                    </div>
                    <!--search form end-->

                    <!--article list start-->

                    <table class="table table-bordered table-striped">
                        <thead>
                        <tr>
                            <th>
                                算法名称
                            </th>
                            <th>
                                上传时间
                            </th>
                            <th>
                                作者
                            </th>
                            <th>
                                下载量
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <s:iterator value="recordList">
                            <tr class="">
                                <td class="sorting_1">
                                    <s:a action="article_details?id=%{id}">
                                        ${title}
                                    </s:a>
                                </td>
                                <td>
                                    <s:date name="createTime" format="yyyy/MM/dd hh:mm:ss"/>
                                </td>
                                <td>
                                        ${author.name}
                                </td>
                                <td class="center ">
                                        ${downloadCount}
                                </td>
                                <td class="center ">
                                    <s:a action="article_getAttachment?id=%{id}"> 下载 </s:a>|
                                    <s:a action="article_details?id=%{id}"> 查看 </s:a>
                                </td>
                            </tr>
                        </s:iterator>
                        </tbody>
                    </table>

                    <!--article list end-->

                    <!--pager start-->
                    <%@ include file="/WEB-INF/jsp/public/pageView.jspf" %>
                    <!--pager end-->

                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>
</html>
